fix(cli): require explicit init for guidance - #343
Conversation
b09329b to
f3b4eb6
Compare
f3b4eb6 to
50f189a
Compare
|
Release-integration note: Konnect v0.10.0 landed after this branchs earlier green CI, so the old run could not prove compatibility with the released base. I rebased onto current main and re-ran the installer/argument tests: 10 focused unit tests plus the advertised-help transaction test pass. The production behavior remains platform-independent; the real clean-home process test is still Unix-only because Windows home discovery cannot be safely redirected by that fixture. Fresh CI is now authoritative. |
|
Release 10 blind-side revalidation note: v0.10.0 changed the surrounding CLI, installer tests, and catalogue documentation after this PR was opened. This branch was rebased onto current upstream and the explicit-init/non-mutating-startup behavior was rerun against the v0.10 command surface. CI is green on Linux, Windows, and macOS. |
Summary
--clientaccepted and validated for command compatibilitykonnect initCloses #242.
Root cause and design
Server startup treated an absent
.installed-{client}marker as a first launch and called the silent installer.uninstalldeliberately removes that same marker, so the next MCP launch could not distinguish an explicit uninstall from a new installation and recreated the guidance.This selects the simpler policy approved in #242: server startup performs no guidance installation at all. Installation remains available only through the explicit
konnect init [--client ...]command. No tombstone or new persistent state is needed.Compatibility and migration
--client claudeand--client codexremain valid server arguments.init,status, anduninstallbehavior is unchanged.konnect initonce.Tests
cargo test --workspace --locked --lib --testscargo test --workspace --locked --doccargo clippy --workspace --locked --all-targets -- -D warningscargo fmt --all -- --checkpython -m unittest discover -s plugin/tests -v(KiCad 10 bundled Python)The real-process home-directory regression runs on Linux and macOS. It is intentionally excluded on Windows because
dirs::home_dir()usesSHGetKnownFolderPaththere and ignoresHOME/USERPROFILE; attempting to redirect it would risk the runner's real client configuration. The normal Windows unit/integration suite remains green. Live-KiCad tests retain their repository-definedignoredstatus.Risk and rollback
Risk is limited to removing an implicit side effect. Rollback is the single commit, but would restore the destructive post-uninstall behavior. No file format, IPC protocol, packaging, schema, or configuration-key changes are involved.